package com.alibaba.cloud.boot.order.config;

import com.netflix.loadbalancer.*;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.MDC;

public class HisRule extends RoundRobinRule {


    @Override
    @XxlJob("sdfsd")
    public Server choose(Object o) {

        String  tenantId = MDC.get("tenantId");
        System.out.println("irule获取到租户id:"+tenantId);
        System.out.println( Thread.currentThread().getName());
        Server server = new Server("127.0.01",6069 );
        return server;
    }


}
